package com.tripwego.client.common;


public abstract class JGTUtils {

	public static boolean renseigne(Object value) {

		return (value != null && !"".equals(value.toString().trim()));
	}

	public static boolean renseigneRichTextEditor(Object value) {

		return (renseigne(value) && !"<br>".equals(value));
	}

	public static int nbOccurences(String chaine, String Text) {
		int nbOccurences = 0;
		int position = 0;
		while ((Text.contains(chaine)) && (!chaine.equals(""))) {
			position = Text.indexOf(chaine);
			Text = Text.substring(position + chaine.length(), Text.length());
			nbOccurences++;
		}
		return nbOccurences;
	}
}
